var obj = {
  _age: 20,
};

Object.defineProperties(obj, {
  name: {
    enumerable: true,
    configurable: true,
    get() {
      return this.name;
    },
    set(value) {
      this.name = value;
    },
  },
  age: {
    enumerable: true,
    configurable: true,
    get() {
      return this._age;
    },
    set(value) {
      this._age = value;
    },
  },
  sex: {
    enumerable: true,
    configurable: true,
    get() {
      return this.sex;
    },
    set(value) {
      this.sex = value;
    },
  },
});
